<template>
    <div>
        <h1>4----小说详情页面</h1>
        <P v-for="(fiction,index) in fiction_li " :key="index">
            小说名称: {{fiction.name}}
            小说作者：{{fiction.user}}
            小说简述：{{fiction.details}}
            小说图片：<img :src="'http://127.0.0.1:8000/' + fiction.img" alt="">
            发布时间：{{fiction.create_time}}
            

        </P>

    </div>
</template>

<script>
import axios from 'axios'
export default {
    data() {
        return {
            fiction_li:[],
            fiction:''

        }
    },
    methods: {

    },
    created() {
        axios({
            url:'http://127.0.0.1:8000/app01/fiction/',
            method:'get'
        }).then(res=>{
            console.log(res.data)
            this.fiction_li = res.data
        })

    }
}
</script>

<style scoped>

</style>
